<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>File Source for WikiPlot.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
						<h1>Source for file WikiPlot.php</h1>
<p>Documentation is available at <a href="../WikiPlot/_WikiPlot.php.html">WikiPlot.php</a></p>
<div class="src-code">
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line"><a name="a2"></a><span class="src-comm">/*</span></div></li>
<li><div class="src-line"><a name="a3"></a><span class="src-comm">Copyright&nbsp;(C)&nbsp;2006&nbsp;by&nbsp;the&nbsp;WikiPlot&nbsp;project&nbsp;authors&nbsp;(See&nbsp;http://code.google.com/p/WikiPlot).</span></div></li>
<li><div class="src-line"><a name="a4"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a5"></a><span class="src-comm">This&nbsp;program&nbsp;is&nbsp;free&nbsp;software;&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and/or&nbsp;modify&nbsp;it&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;as&nbsp;published&nbsp;by&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation;&nbsp;either&nbsp;version&nbsp;2&nbsp;of&nbsp;the&nbsp;License,&nbsp;or&nbsp;(at&nbsp;your&nbsp;option)&nbsp;any&nbsp;later&nbsp;version.</span></div></li>
<li><div class="src-line"><a name="a6"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a7"></a><span class="src-comm">This&nbsp;program&nbsp;is&nbsp;distributed&nbsp;in&nbsp;the&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;be&nbsp;useful,&nbsp;but&nbsp;WITHOUT&nbsp;ANY&nbsp;WARRANTY;&nbsp;without&nbsp;even&nbsp;the&nbsp;implied&nbsp;warranty&nbsp;of&nbsp;MERCHANTABILITY&nbsp;or&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE.&nbsp;See&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;for&nbsp;more&nbsp;details.</span></div></li>
<li><div class="src-line"><a name="a8"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a9"></a><span class="src-comm">You&nbsp;should&nbsp;have&nbsp;received&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;along&nbsp;with&nbsp;this&nbsp;program;&nbsp;if&nbsp;not,&nbsp;write&nbsp;to&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation,&nbsp;Inc.,&nbsp;59&nbsp;Temple&nbsp;Place,&nbsp;Suite&nbsp;330,&nbsp;Boston,&nbsp;MA&nbsp;02111-1307&nbsp;USA</span></div></li>
<li><div class="src-line"><a name="a10"></a><span class="src-comm">*/</span></div></li>
<li><div class="src-line"><a name="a11"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a12"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a13"></a><span class="src-doc">*&nbsp;The&nbsp;MediaWiki&nbsp;extension</span></div></li>
<li><div class="src-line"><a name="a14"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a15"></a><span class="src-doc">*&nbsp;This&nbsp;is&nbsp;the&nbsp;MediaWiki&nbsp;extension&nbsp;it&nbsp;self,&nbsp;everything&nbsp;else&nbsp;is&nbsp;just&nbsp;functions&nbsp;and&nbsp;liberaries&nbsp;for&nbsp;this&nbsp;file.</span></div></li>
<li><div class="src-line"><a name="a16"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a17"></a><span class="src-doc">*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;WikiPlot</span></div></li>
<li><div class="src-line"><a name="a18"></a><span class="src-doc">*&nbsp;</span><span class="src-doc-coretag">@license</span><span class="src-doc">&nbsp;http://www.gnu.org/licenses/gpl.txt&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License</span></div></li>
<li><div class="src-line"><a name="a19"></a><span class="src-doc">*&nbsp;</span><span class="src-doc-coretag">@author</span><span class="src-doc">&nbsp;WikiPlot&nbsp;development&nbsp;team.</span></div></li>
<li><div class="src-line"><a name="a20"></a><span class="src-doc">*&nbsp;</span><span class="src-doc-coretag">@copyright</span><span class="src-doc">&nbsp;Copyright&nbsp;2006,&nbsp;WikiPlot&nbsp;development&nbsp;team.</span></div></li>
<li><div class="src-line"><a name="a21"></a><span class="src-doc">*/</span></div></li>
<li><div class="src-line"><a name="a22"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a23"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a24"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a25"></a><span class="src-doc">*Include&nbsp;plot.class.php</span></div></li>
<li><div class="src-line"><a name="a26"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a27"></a><span class="src-doc">*Requires&nbsp;PlotClass&nbsp;to&nbsp;render&nbsp;plots.</span></div></li>
<li><div class="src-line"><a name="a28"></a><span class="src-doc">*/</span></div></li>
<li><div class="src-line"><a name="a29"></a><span class="src-inc">require_once</span><span class="src-sym">(</span><span class="src-str">&quot;PlotClass/plot.class.php&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a30"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a31"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a32"></a><span class="src-doc">*Include&nbsp;xml.class.php</span></div></li>
<li><div class="src-line"><a name="a33"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a34"></a><span class="src-doc">*Requires&nbsp;XMLParser&nbsp;to&nbsp;parse&nbsp;xml&nbsp;to&nbsp;plot.</span></div></li>
<li><div class="src-line"><a name="a35"></a><span class="src-doc">*/</span></div></li>
<li><div class="src-line"><a name="a36"></a><span class="src-inc">require_once</span><span class="src-sym">(</span><span class="src-str">&quot;xml.class.php&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a37"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a38"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a39"></a><span class="src-doc">*Include&nbsp;cache.class.php</span></div></li>
<li><div class="src-line"><a name="a40"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a41"></a><span class="src-doc">*Requires&nbsp;Cache&nbsp;to&nbsp;control&nbsp;the&nbsp;cache.</span></div></li>
<li><div class="src-line"><a name="a42"></a><span class="src-doc">*/</span></div></li>
<li><div class="src-line"><a name="a43"></a><span class="src-inc">require_once</span><span class="src-sym">(</span><span class="src-str">&quot;cache.class.php&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a44"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a45"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a46"></a><span class="src-doc">*Register&nbsp;the&nbsp;WikiPlot&nbsp;extension</span></div></li>
<li><div class="src-line"><a name="a47"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a48"></a><span class="src-doc">*Makes&nbsp;sure&nbsp;the&nbsp;extension&nbsp;is&nbsp;called&nbsp;when&nbsp;MediaWiki&nbsp;is&nbsp;started.</span></div></li>
<li><div class="src-line"><a name="a49"></a><span class="src-doc">*/</span></div></li>
<li><div class="src-line"><a name="a50"></a><span class="src-var">$wgExtensionFunctions</span><span class="src-sym">[</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-str">&quot;wfWikiPlotExtension&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a51"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a52"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a53"></a><span class="src-doc">*Add&nbsp;hooks</span></div></li>
<li><div class="src-line"><a name="a54"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a55"></a><span class="src-doc">*Adds&nbsp;hooks&nbsp;so&nbsp;MediaWiki&nbsp;will&nbsp;perform&nbsp;callback,&nbsp;when&nbsp;it&nbsp;hits&nbsp;the&nbsp;wikiplot&nbsp;tag.</span></div></li>
<li><div class="src-line"><a name="a56"></a><span class="src-doc">*/</span></div></li>
<li><div class="src-line"><a name="a57"></a><span class="src-key">function&nbsp;</span><a href="../WikiPlot/_WikiPlot.php.html#functionwfWikiPlotExtension">wfWikiPlotExtension</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a58"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$wgParser</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a59"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$wgParser</span><span class="src-sym">-&gt;</span><span class="src-id">setHook</span><span class="src-sym">(&nbsp;</span><span class="src-str">&quot;wikiplot&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;RenderWikiPlot&quot;&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a60"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a61"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a62"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a63"></a><span class="src-doc">*Deserialize&nbsp;boolean</span></div></li>
<li><div class="src-line"><a name="a64"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a65"></a><span class="src-doc">*Deserializes&nbsp;a&nbsp;boolean&nbsp;value&nbsp;from&nbsp;string,&nbsp;this&nbsp;function&nbsp;is&nbsp;used&nbsp;when&nbsp;you&nbsp;want&nbsp;to&nbsp;deserialize&nbsp;parameters&nbsp;given&nbsp;in&nbsp;the&nbsp;WikiML.</span></div></li>
<li><div class="src-line"><a name="a66"></a><span class="src-doc">*If&nbsp;it&nbsp;is&nbsp;impossible&nbsp;to&nbsp;deserialize&nbsp;the&nbsp;value,&nbsp;the&nbsp;output&nbsp;object&nbsp;is&nbsp;not&nbsp;initialized&nbsp;at&nbsp;all.</span></div></li>
<li><div class="src-line"><a name="a67"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a68"></a><span class="src-doc">*</span><span class="src-doc-coretag">@access</span><span class="src-doc">&nbsp;private</span></div></li>
<li><div class="src-line"><a name="a69"></a><span class="src-doc">*</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$value&nbsp;</span><span class="src-doc">The&nbsp;string&nbsp;you&nbsp;wish&nbsp;to&nbsp;deserialize.</span></div></li>
<li><div class="src-line"><a name="a70"></a><span class="src-doc">*</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">boolean&nbsp;</span><span class="src-doc-var">&amp;$SetTo&nbsp;</span><span class="src-doc">The&nbsp;variable&nbsp;you&nbsp;want&nbsp;the&nbsp;values&nbsp;parsed&nbsp;to.</span></div></li>
<li><div class="src-line"><a name="a71"></a><span class="src-doc">*/</span></div></li>
<li><div class="src-line"><a name="a72"></a><span class="src-key">function&nbsp;</span><a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeBoolean">WikiPlotDeserializeBoolean</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">,</span><span class="src-sym">&amp;</span><span class="src-var">$SetTo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a73"></a><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a74"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$value&nbsp;</span>==&nbsp;<span class="src-str">&quot;true&quot;</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a75"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a76"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$SetTo&nbsp;</span>=&nbsp;<span class="src-id">true</span><span class="src-sym">;&nbsp;&nbsp;&nbsp;&nbsp;</span></div></li>
<li><div class="src-line"><a name="a77"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a78"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$value&nbsp;</span>==&nbsp;<span class="src-str">&quot;false&quot;</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a79"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a80"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$SetTo&nbsp;</span>=&nbsp;<span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a81"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a82"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a83"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a84"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a85"></a><span class="src-doc">*Deserialize&nbsp;String</span></div></li>
<li><div class="src-line"><a name="a86"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a87"></a><span class="src-doc">*Deserializes&nbsp;a&nbsp;string&nbsp;value&nbsp;from&nbsp;string,&nbsp;this&nbsp;function&nbsp;is&nbsp;used&nbsp;when&nbsp;you&nbsp;want&nbsp;to&nbsp;deserialize&nbsp;parameters&nbsp;given&nbsp;in&nbsp;the&nbsp;WikiML.</span></div></li>
<li><div class="src-line"><a name="a88"></a><span class="src-doc">*If&nbsp;it&nbsp;is&nbsp;impossible&nbsp;to&nbsp;deserialize&nbsp;the&nbsp;value,&nbsp;the&nbsp;output&nbsp;object&nbsp;is&nbsp;not&nbsp;initialized&nbsp;at&nbsp;all.&nbsp;Usualy&nbsp;this&nbsp;function&nbsp;does&nbsp;nothing.</span></div></li>
<li><div class="src-line"><a name="a89"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a90"></a><span class="src-doc">*</span><span class="src-doc-coretag">@access</span><span class="src-doc">&nbsp;private</span></div></li>
<li><div class="src-line"><a name="a91"></a><span class="src-doc">*</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$value&nbsp;</span><span class="src-doc">The&nbsp;string&nbsp;you&nbsp;wish&nbsp;to&nbsp;deserialize.</span></div></li>
<li><div class="src-line"><a name="a92"></a><span class="src-doc">*</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">&amp;$SetTo&nbsp;</span><span class="src-doc">The&nbsp;variable&nbsp;you&nbsp;want&nbsp;the&nbsp;values&nbsp;parsed&nbsp;to.</span></div></li>
<li><div class="src-line"><a name="a93"></a><span class="src-doc">*/</span></div></li>
<li><div class="src-line"><a name="a94"></a><span class="src-key">function&nbsp;</span><a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeString">WikiPlotDeserializeString</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">,</span><span class="src-sym">&amp;</span><span class="src-var">$SetTo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a95"></a><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a96"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_string">is_string</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a97"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a98"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$SetTo&nbsp;</span>=&nbsp;<span class="src-var">$value</span><span class="src-sym">;&nbsp;&nbsp;&nbsp;&nbsp;</span></div></li>
<li><div class="src-line"><a name="a99"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a100"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a101"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a102"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a103"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a104"></a><span class="src-doc">*Deserialize&nbsp;Coordiante</span></div></li>
<li><div class="src-line"><a name="a105"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a106"></a><span class="src-doc">*Deserializes&nbsp;a&nbsp;2&nbsp;integers&nbsp;from&nbsp;string,&nbsp;this&nbsp;function&nbsp;is&nbsp;used&nbsp;when&nbsp;you&nbsp;want&nbsp;to&nbsp;deserialize&nbsp;parameters&nbsp;given&nbsp;in&nbsp;the&nbsp;WikiML.</span></div></li>
<li><div class="src-line"><a name="a107"></a><span class="src-doc">*If&nbsp;it&nbsp;is&nbsp;impossible&nbsp;to&nbsp;deserialize&nbsp;the&nbsp;value,&nbsp;the&nbsp;output&nbsp;object&nbsp;is&nbsp;not&nbsp;initialized&nbsp;at&nbsp;all.</span></div></li>
<li><div class="src-line"><a name="a108"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a109"></a><span class="src-doc">*</span><span class="src-doc-coretag">@access</span><span class="src-doc">&nbsp;private</span></div></li>
<li><div class="src-line"><a name="a110"></a><span class="src-doc">*</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$value&nbsp;</span><span class="src-doc">The&nbsp;string&nbsp;you&nbsp;wish&nbsp;to&nbsp;deserialize.</span></div></li>
<li><div class="src-line"><a name="a111"></a><span class="src-doc">*</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc-var">&amp;$SetTo1&nbsp;</span><span class="src-doc">The&nbsp;variable&nbsp;you&nbsp;want&nbsp;the&nbsp;values&nbsp;parsed&nbsp;to.</span></div></li>
<li><div class="src-line"><a name="a112"></a><span class="src-doc">*</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc-var">&amp;$SetTo2&nbsp;</span><span class="src-doc">The&nbsp;variable&nbsp;you&nbsp;want&nbsp;the&nbsp;values&nbsp;parsed&nbsp;to.</span></div></li>
<li><div class="src-line"><a name="a113"></a><span class="src-doc">*/</span></div></li>
<li><div class="src-line"><a name="a114"></a><span class="src-key">function&nbsp;</span><a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeMixed">WikiPlotDeserializeMixed</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">,</span><span class="src-sym">&amp;</span><span class="src-var">$SetTo1</span><span class="src-sym">,</span><span class="src-sym">&amp;</span><span class="src-var">$SetTo2</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a115"></a><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a116"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a117"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a118"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">&quot;;&quot;</span><span class="src-sym">,</span><span class="src-var">$value</span><span class="src-sym">,</span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a119"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_numeric">is_numeric</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)</span>&amp;&amp;<a href="http://www.php.net/is_numeric">is_numeric</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a120"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a121"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$SetTo1&nbsp;</span>=&nbsp;<span class="src-var">$values</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a122"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$SetTo2&nbsp;</span>=&nbsp;<span class="src-var">$values</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a123"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a124"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a125"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a126"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a127"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a128"></a><span class="src-doc">*Deserialize&nbsp;Integer</span></div></li>
<li><div class="src-line"><a name="a129"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a130"></a><span class="src-doc">*Deserializes&nbsp;a&nbsp;integer&nbsp;value&nbsp;from&nbsp;string,&nbsp;this&nbsp;function&nbsp;is&nbsp;used&nbsp;when&nbsp;you&nbsp;want&nbsp;to&nbsp;deserialize&nbsp;parameters&nbsp;given&nbsp;in&nbsp;the&nbsp;WikiML.</span></div></li>
<li><div class="src-line"><a name="a131"></a><span class="src-doc">*If&nbsp;it&nbsp;is&nbsp;impossible&nbsp;to&nbsp;deserialize&nbsp;the&nbsp;value,&nbsp;the&nbsp;output&nbsp;object&nbsp;is&nbsp;not&nbsp;initialized&nbsp;at&nbsp;all.&nbsp;Usualy&nbsp;this&nbsp;function&nbsp;does&nbsp;nothing&nbsp;at&nbsp;all,&nbsp;just&nbsp;checks&nbsp;to&nbsp;see&nbsp;if&nbsp;the&nbsp;value&nbsp;can&nbsp;be&nbsp;parsed&nbsp;as&nbsp;an&nbsp;integer.</span></div></li>
<li><div class="src-line"><a name="a132"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a133"></a><span class="src-doc">*</span><span class="src-doc-coretag">@access</span><span class="src-doc">&nbsp;private</span></div></li>
<li><div class="src-line"><a name="a134"></a><span class="src-doc">*</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$value&nbsp;</span><span class="src-doc">The&nbsp;string&nbsp;you&nbsp;wish&nbsp;to&nbsp;deserialize.</span></div></li>
<li><div class="src-line"><a name="a135"></a><span class="src-doc">*</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">Integer&nbsp;</span><span class="src-doc-var">&amp;$SetTo&nbsp;</span><span class="src-doc">The&nbsp;variable&nbsp;you&nbsp;want&nbsp;the&nbsp;values&nbsp;parsed&nbsp;to.</span></div></li>
<li><div class="src-line"><a name="a136"></a><span class="src-doc">*/</span></div></li>
<li><div class="src-line"><a name="a137"></a><span class="src-key">function&nbsp;</span><a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeInteger">WikiPlotDeserializeInteger</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">,</span><span class="src-sym">&amp;</span><span class="src-var">$SetTo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a138"></a><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a139"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a140"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a141"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_numeric">is_numeric</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a142"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a143"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$SetTo&nbsp;</span>=&nbsp;<span class="src-var">$value</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a144"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a145"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a146"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a147"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a148"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a149"></a><span class="src-doc">*Deserialize&nbsp;Color</span></div></li>
<li><div class="src-line"><a name="a150"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a151"></a><span class="src-doc">*Deserializes&nbsp;an&nbsp;array&nbsp;representation&nbsp;of&nbsp;a&nbsp;rgb&nbsp;color&nbsp;from&nbsp;string,&nbsp;this&nbsp;function&nbsp;is&nbsp;used&nbsp;when&nbsp;you&nbsp;want&nbsp;to&nbsp;deserialize&nbsp;parameters&nbsp;given&nbsp;in&nbsp;the&nbsp;WikiML.</span></div></li>
<li><div class="src-line"><a name="a152"></a><span class="src-doc">*This&nbsp;function&nbsp;can&nbsp;deserialize&nbsp;colors&nbsp;written&nbsp;as&nbsp;&quot;255,255,255&quot;&nbsp;(rgb)&nbsp;or&nbsp;&quot;#000000&quot;&nbsp;(hex).</span></div></li>
<li><div class="src-line"><a name="a153"></a><span class="src-doc">*If&nbsp;it&nbsp;is&nbsp;impossible&nbsp;to&nbsp;deserialize&nbsp;the&nbsp;value,&nbsp;the&nbsp;output&nbsp;object&nbsp;is&nbsp;not&nbsp;initialized&nbsp;at&nbsp;all.</span></div></li>
<li><div class="src-line"><a name="a154"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a155"></a><span class="src-doc">*</span><span class="src-doc-coretag">@access</span><span class="src-doc">&nbsp;private</span></div></li>
<li><div class="src-line"><a name="a156"></a><span class="src-doc">*</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$value&nbsp;</span><span class="src-doc">The&nbsp;string&nbsp;you&nbsp;wish&nbsp;to&nbsp;deserialize.</span></div></li>
<li><div class="src-line"><a name="a157"></a><span class="src-doc">*</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">&amp;$SetTo&nbsp;</span><span class="src-doc">The&nbsp;variable&nbsp;you&nbsp;want&nbsp;the&nbsp;values&nbsp;parsed&nbsp;to.</span></div></li>
<li><div class="src-line"><a name="a158"></a><span class="src-doc">*/</span></div></li>
<li><div class="src-line"><a name="a159"></a><span class="src-key">function&nbsp;</span><a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeColor">WikiPlotDeserializeColor</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">,</span><span class="src-sym">&amp;</span><span class="src-var">$SetTo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a160"></a><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a161"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a162"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a163"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">&quot;,&quot;</span><span class="src-sym">,</span><span class="src-var">$value</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a164"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_numeric">is_numeric</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)</span>&amp;&amp;<a href="http://www.php.net/is_numeric">is_numeric</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span>&amp;&amp;<a href="http://www.php.net/is_numeric">is_numeric</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a165"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a166"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$SetTo&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-var">$values</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-var">$values</span><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a167"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a168"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">elseif</span><span class="src-sym">(</span><a href="http://www.php.net/strstr">strstr</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">,</span><span class="src-str">&quot;#&quot;</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a169"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a170"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$red&nbsp;</span>=&nbsp;<a href="http://www.php.net/hexdec">hexdec</a><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$val</span><span class="src-sym">,&nbsp;</span><span class="src-num">1&nbsp;</span><span class="src-sym">,&nbsp;</span><span class="src-num">2</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a171"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$green&nbsp;</span>=&nbsp;<a href="http://www.php.net/hexdec">hexdec</a><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$val</span><span class="src-sym">,&nbsp;</span><span class="src-num">3&nbsp;</span><span class="src-sym">,&nbsp;</span><span class="src-num">2</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a172"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$blue&nbsp;</span>=&nbsp;<a href="http://www.php.net/hexdec">hexdec</a><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$val</span><span class="src-sym">,&nbsp;</span><span class="src-num">5&nbsp;</span><span class="src-sym">,&nbsp;</span><span class="src-num">2</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a173"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$SetTo&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$red</span><span class="src-sym">,</span><span class="src-var">$green</span><span class="src-sym">,</span><span class="src-var">$blue</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a174"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a175"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a176"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a177"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a178"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a179"></a><span class="src-doc">*RenderWikiPlot&nbsp;CallBack&nbsp;function</span></div></li>
<li><div class="src-line"><a name="a180"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a181"></a><span class="src-doc">*This&nbsp;is&nbsp;the&nbsp;function&nbsp;that&nbsp;handles&nbsp;MediaWiki&nbsp;callbacks,&nbsp;and&nbsp;renders&nbsp;the&nbsp;actual&nbsp;plot.</span></div></li>
<li><div class="src-line"><a name="a182"></a><span class="src-doc">*</span></div></li>
<li><div class="src-line"><a name="a183"></a><span class="src-doc">*</span><span class="src-doc-coretag">@access</span><span class="src-doc">&nbsp;private</span></div></li>
<li><div class="src-line"><a name="a184"></a><span class="src-doc">*</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$input&nbsp;</span><span class="src-doc">The&nbsp;content&nbsp;of&nbsp;the&nbsp;wikiplot&nbsp;tag</span></div></li>
<li><div class="src-line"><a name="a185"></a><span class="src-doc">*</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$argv&nbsp;</span><span class="src-doc">Hash-array&nbsp;of&nbsp;the&nbsp;parameters&nbsp;of&nbsp;the&nbsp;wikiplot&nbsp;tag,&nbsp;with&nbsp;parameter-name&nbsp;as&nbsp;key&nbsp;and&nbsp;parameter-value&nbsp;as&nbsp;value.</span></div></li>
<li><div class="src-line"><a name="a186"></a><span class="src-doc">*</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">Parser&nbsp;</span><span class="src-doc-var">$parser&nbsp;</span><span class="src-doc">The&nbsp;parser&nbsp;of&nbsp;MediaWiki,&nbsp;if&nbsp;null&nbsp;parser&nbsp;is&nbsp;obtained&nbsp;from&nbsp;global&nbsp;variable</span></div></li>
<li><div class="src-line"><a name="a187"></a><span class="src-doc">*</span><span class="src-doc-coretag">@uses</span><span class="src-doc">&nbsp;WikiPlotDeserializeBoolean()</span></div></li>
<li><div class="src-line"><a name="a188"></a><span class="src-doc">*</span><span class="src-doc-coretag">@uses</span><span class="src-doc">&nbsp;WikiPlotDeserializeString()</span></div></li>
<li><div class="src-line"><a name="a189"></a><span class="src-doc">*</span><span class="src-doc-coretag">@uses</span><span class="src-doc">&nbsp;WikiPlotDeserializeMixed()</span></div></li>
<li><div class="src-line"><a name="a190"></a><span class="src-doc">*</span><span class="src-doc-coretag">@uses</span><span class="src-doc">&nbsp;WikiPlotDeserializeInteger()</span></div></li>
<li><div class="src-line"><a name="a191"></a><span class="src-doc">*</span><span class="src-doc-coretag">@uses</span><span class="src-doc">&nbsp;WikiPlotDeserializeColor()</span></div></li>
<li><div class="src-line"><a name="a192"></a><span class="src-doc">*</span><span class="src-doc-coretag">@uses</span><span class="src-doc">&nbsp;XMLParser</span></div></li>
<li><div class="src-line"><a name="a193"></a><span class="src-doc">*</span><span class="src-doc-coretag">@uses</span><span class="src-doc">&nbsp;Plot</span></div></li>
<li><div class="src-line"><a name="a194"></a><span class="src-doc">*</span><span class="src-doc-coretag">@uses</span><span class="src-doc">&nbsp;Graph</span></div></li>
<li><div class="src-line"><a name="a195"></a><span class="src-doc">*</span><span class="src-doc-coretag">@uses</span><span class="src-doc">&nbsp;Cache</span></div></li>
<li><div class="src-line"><a name="a196"></a><span class="src-doc">*</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc">HTML&nbsp;that&nbsp;can&nbsp;be&nbsp;directly&nbsp;inserted&nbsp;into&nbsp;any&nbsp;website.</span></div></li>
<li><div class="src-line"><a name="a197"></a><span class="src-doc">*/</span></div></li>
<li><div class="src-line"><a name="a198"></a><span class="src-key">function&nbsp;</span><a href="../WikiPlot/_WikiPlot.php.html#functionRenderWikiPlot">RenderWikiPlot</a><span class="src-sym">(</span><span class="src-var">$input</span><span class="src-sym">,&nbsp;</span><span class="src-var">$argv</span><span class="src-sym">,&nbsp;</span><span class="src-var">$parser&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a199"></a><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a200"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//Get&nbsp;parser&nbsp;if&nbsp;not&nbsp;given&nbsp;as&nbsp;parameter</span></div></li>
<li><div class="src-line"><a name="a201"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$parser</span><span class="src-sym">)&nbsp;</span><span class="src-var">$parser&nbsp;</span>=<span class="src-sym">&amp;&nbsp;</span><span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'wgParser'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a202"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">/*Currently&nbsp;the&nbsp;parser*/</span></div></li>
<li><div class="src-line"><a name="a203"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a204"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//Creating&nbsp;instance&nbsp;of&nbsp;plot</span></div></li>
<li><div class="src-line"><a name="a205"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$Plot&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../WikiPlot/PlotClass/Plot.html">Plot</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a206"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a207"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//Getting&nbsp;and&nbsp;deserializing&nbsp;parameters</span></div></li>
<li><div class="src-line"><a name="a208"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeBoolean">WikiPlotDeserializeBoolean</a><span class="src-sym">(</span><span class="src-var">$argv</span><span class="src-sym">[</span><span class="src-str">&quot;grid&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-var">$Plot</span><span class="src-sym">-&gt;</span><span class="src-id">EnableGrid</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a209"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeBoolean">WikiPlotDeserializeBoolean</a><span class="src-sym">(</span><span class="src-var">$argv</span><span class="src-sym">[</span><span class="src-str">&quot;axis&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-var">$Plot</span><span class="src-sym">-&gt;</span><span class="src-id">EnableAxis</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a210"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a211"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeString">WikiPlotDeserializeString</a><span class="src-sym">(</span><span class="src-var">$argv</span><span class="src-sym">[</span><span class="src-str">&quot;caption&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-var">$Plot</span><span class="src-sym">-&gt;</span><span class="src-id">Caption</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a212"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a213"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeMixed">WikiPlotDeserializeMixed</a><span class="src-sym">(</span><span class="src-var">$argv</span><span class="src-sym">[</span><span class="src-str">&quot;xspan&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-var">$Plot</span><span class="src-sym">-&gt;</span><span class="src-id">MinX</span><span class="src-sym">,</span><span class="src-var">$Plot</span><span class="src-sym">-&gt;</span><span class="src-id">MaxX</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a214"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeMixed">WikiPlotDeserializeMixed</a><span class="src-sym">(</span><span class="src-var">$argv</span><span class="src-sym">[</span><span class="src-str">&quot;yspan&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-var">$Plot</span><span class="src-sym">-&gt;</span><span class="src-id">MinY</span><span class="src-sym">,</span><span class="src-var">$Plot</span><span class="src-sym">-&gt;</span><span class="src-id">MaxY</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a215"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeMixed">WikiPlotDeserializeMixed</a><span class="src-sym">(</span><span class="src-var">$argv</span><span class="src-sym">[</span><span class="src-str">&quot;gridspace&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-var">$Plot</span><span class="src-sym">-&gt;</span><span class="src-id">XGridSpace</span><span class="src-sym">,</span><span class="src-var">$Plot</span><span class="src-sym">-&gt;</span><span class="src-id">YGridSpace</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a216"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a217"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeInteger">WikiPlotDeserializeInteger</a><span class="src-sym">(</span><span class="src-var">$argv</span><span class="src-sym">[</span><span class="src-str">&quot;height&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-var">$Plot</span><span class="src-sym">-&gt;</span><span class="src-id">Height</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a218"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeInteger">WikiPlotDeserializeInteger</a><span class="src-sym">(</span><span class="src-var">$argv</span><span class="src-sym">[</span><span class="src-str">&quot;width&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-var">$Plot</span><span class="src-sym">-&gt;</span><span class="src-id">Width</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a219"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeInteger">WikiPlotDeserializeInteger</a><span class="src-sym">(</span><span class="src-var">$argv</span><span class="src-sym">[</span><span class="src-str">&quot;captionfont&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-var">$Plot</span><span class="src-sym">-&gt;</span><span class="src-id">CaptionFont</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a220"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeInteger">WikiPlotDeserializeInteger</a><span class="src-sym">(</span><span class="src-var">$argv</span><span class="src-sym">[</span><span class="src-str">&quot;gridfont&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-var">$Plot</span><span class="src-sym">-&gt;</span><span class="src-id">GridFont</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a221"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a222"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeColor">WikiPlotDeserializeColor</a><span class="src-sym">(</span><span class="src-var">$argv</span><span class="src-sym">[</span><span class="src-str">&quot;gridcolor&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-var">$Plot</span><span class="src-sym">-&gt;</span><span class="src-id">GridColor</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a223"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a224"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//Parsing&nbsp;Xml</span></div></li>
<li><div class="src-line"><a name="a225"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$XmlParser&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../WikiPlot/XMLParser.html">XMLParser</a></span><span class="src-sym">(</span><span class="src-var">$input</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a226"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$Graphs&nbsp;</span>=&nbsp;<span class="src-var">$XmlParser</span><span class="src-sym">-&gt;</span><span class="src-id">CreateInputArray</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a227"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a228"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$Graphs&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$Graph</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a229"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a230"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$G&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../WikiPlot/PlotClass/Graph.html">Graph</a></span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a231"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$Graph</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a232"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a233"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$G</span><span class="src-sym">-&gt;</span><span class="src-id">Exp&nbsp;</span>=&nbsp;<span class="src-var">$Graph</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a234"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeString">WikiPlotDeserializeString</a><span class="src-sym">(</span><span class="src-var">$Graph</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">&quot;label&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-var">$G</span><span class="src-sym">-&gt;</span><span class="src-id">Label</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a235"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../WikiPlot/_WikiPlot.php.html#functionWikiPlotDeserializeColor">WikiPlotDeserializeColor</a><span class="src-sym">(</span><span class="src-var">$Graph</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">&quot;color&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-var">$G</span><span class="src-sym">-&gt;</span><span class="src-id">Color</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a236"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span><span class="src-key">else</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a237"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$G</span><span class="src-sym">-&gt;</span><span class="src-id">Exp&nbsp;</span>=&nbsp;<span class="src-var">$Graph</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a238"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a239"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/array_push">array_push</a><span class="src-sym">(</span><span class="src-var">$Plot</span><span class="src-sym">-&gt;</span><span class="src-id">Graphs</span><span class="src-sym">,</span><span class="src-var">$G</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a240"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a241"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a242"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//Render&nbsp;the&nbsp;plot</span></div></li>
<li><div class="src-line"><a name="a243"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a244"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//Get&nbsp;instance&nbsp;of&nbsp;cache</span></div></li>
<li><div class="src-line"><a name="a245"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$cache&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">cache</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a246"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a247"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//Url&nbsp;of&nbsp;the&nbsp;current&nbsp;plot</span></div></li>
<li><div class="src-line"><a name="a248"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$PlotURL&nbsp;</span>=&nbsp;<span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a249"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a250"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$PlotFileName&nbsp;</span>=&nbsp;<span class="src-var">$Plot</span><span class="src-sym">-&gt;</span><span class="src-id">GetHash</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-str">&quot;.png&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a251"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$cache</span><span class="src-sym">-&gt;</span><span class="src-id">FileExist</span><span class="src-sym">(</span><span class="src-var">$PlotFileName</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a252"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a253"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$Plot</span><span class="src-sym">-&gt;</span><span class="src-id">SaveAs</span><span class="src-sym">(</span><span class="src-var">$cache</span><span class="src-sym">-&gt;</span><span class="src-id">CachePath</span><span class="src-sym">(</span><span class="src-var">$PlotFileName</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a254"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span><span class="src-key">else</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a255"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$PlotURL&nbsp;</span>=&nbsp;<span class="src-var">$cache</span><span class="src-sym">-&gt;</span><span class="src-id">FileURL</span><span class="src-sym">(</span><span class="src-var">$PlotFileName</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a256"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a257"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a258"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$output&nbsp;</span>=&nbsp;<span class="src-str">&quot;</span><span class="src-str">&lt;<span class="src-id">a</span>&nbsp;<span class="src-id">href</span>='<span class="src-var">$PlotURL</span>'&nbsp;<span class="src-id">class</span>='<span class="src-id">image</span>'&nbsp;<span class="src-id">title</span>='<span class="src-id">See</span>&nbsp;<span class="src-id">the</span>&nbsp;<span class="src-id">plot</span>'&gt;&lt;<span class="src-id">img</span>&nbsp;<span class="src-id">src</span>='<span class="src-var">$PlotURL</span>'&gt;&lt;/<span class="src-id">a</span>&gt;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a259"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a260"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$output</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a261"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a262"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a263"></a><span class="src-php">?&gt;</span></div></li>
</ol></div>
</div>
	<p class="notes" id="credit">
		Documentation generated on Fri, 13 Oct 2006 16:12:28 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0</a>
	</p>
	</body>
</html>